/**
 * 
 */
package net.sahv.bdyz.service;

import java.util.List;
import java.util.Map;

import net.sahv.bdyz.mapper.RoleAuthorityMapper;
import net.sahv.bdyz.model.RoleAuthority;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 张天敏
 * @date 日期：2016年8月5日 时间：下午6:17:56
 */
@Service
public class RoleAuthorityService {
	
	@Autowired
	private RoleAuthorityMapper roleAuthorityMapper;
	
    public int deleteByPrimaryKey(Integer raId){
    	return roleAuthorityMapper.deleteByPrimaryKey(raId);
    }

    public int insert(RoleAuthority record){
    	return roleAuthorityMapper.insert(record);
    }

    public RoleAuthority selectByPrimaryKey(Integer raId){
    	return roleAuthorityMapper.selectByPrimaryKey(raId);
    }

    public List<RoleAuthority> selectAll(){
    	return roleAuthorityMapper.selectAll();
    }

    public int updateByPrimaryKey(RoleAuthority record){
    	return roleAuthorityMapper.updateByPrimaryKey(record);
    }

	/**
	 * 根据角色Id查找用户权限
	 * @author 张天敏
	 * @date 日期：2016年8月5日 时间：下午6:21:20
	 * @param parseInt
	 * @return
	 */
	public List<Map<String, Object>> selectAuthorityByRoleId(int parseInt) {
		return roleAuthorityMapper.selectAuthorityByRoleId(parseInt);
	}

}
